package com.spring.cloud.consumer.controller;

import com.garden.springcloud.project.entity.User;
import com.spring.cloud.consumer.server.MyUserServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class MyUserController {
    @Resource
    private MyUserServer userService;

    @RequestMapping("user")
    public List<User> getUser() {
        return userService.getUser();
    }

    @GetMapping(value = "getValue")
    public String getValue(){
        return userService.getValue();
    }
}
